

#ifndef FLASH_CARD_GUI_H
#define FLASH_CARD_GUI_H


#include <QWidget>
#include <QMap>
#include "Card.h"
#include "CardDeck.h"

class QLabel;
class QLineEdit;
class QPushButton;
class QTextEdit;

class FlashCardGUI : public QWidget
{
    Q_OBJECT

public:
    FlashCardGUI(QWidget *parent = 0);
    enum Mode { NavigationMode, AddingMode, EditingMode };

public slots:
    void createCard();
    void addCard();
    void cancel();
    void next();
    void previous();
    void editCard();
    void deleteCard();
    void flipCard();

private:
    void updateInterface(Mode mode);
    QPushButton *createButton;
    QPushButton *addButton;
    QPushButton *cancelButton; 
    QPushButton *nextButton;
    QPushButton *previousButton;
    QPushButton *editButton;
    QPushButton *deleteButton;
    QPushButton *flipButton;
    
    QLabel *questionLabel;
    QLabel *answerLabel;
    
    QLineEdit *cardQuestion;
    QLineEdit *cardAnswer;
    
    QTextEdit *displayCard;


    CardDeck<Card> cardDeck;
    Card currentCard;
    Card newCard;
    int currentIndex;
    bool answerShowing;
    QString oldQuestion; // change to our string
    QString oldAnswer; // change to our string
    Mode currentMode;
};


#endif
